<?php
  /**
   * This class is used to handle the elements of the the XML class.
   */
class ObjectElement {
  var $value;
  var $type;
  var $numElements;

  /**
   *This function constructs an element for the XML class.
   * @param <string> $value String with the value of the element
   * @param <string> $type string with the type of the element
   * @param <integer> $numElements Integer with the num of the elements.
   */
  function  __construct($value, $type,$numElements) {
    $this->value = $value;
    $this->type = $type;
    $this->numElements = $numElements;
  }
  /**
   *It returns the value of the element
   * @return <string> string with the value
   */
  function getValue() {
    return $this->value;
  }
  /**
   *It returns the type of the element
   * @return <string> string with the type of the element
   */
  function getType() {
    return $this->type;
  }

  /**
   *It returns the num of elements contained.
   * @return <integer> Integer with the num of the elements.
   */
  function getNumElements(){
    return $this->numElements;
  }
  }

/**
 This class handles the struct objects extracted from the XML schema.
*/
class ObjectStruct {
  var $value;
  var $type;
  var $parentName;
  var $brotherName;

  /**
   This function constructs an object of the structure
  */
  function  __construct($value, $type,$parentName,$brotherName) {
    $this->value = $value;
    $this->type = $type;
    $this->parentName = $parentName;
    $this->brotherName = $brotherName;
  }
  /**
   This functions returns the name of the parent.
  */
  function getParentName() {
    return $this->parentName;
  }
  /**
   This function returns the name of the brother
  */
  function getBrotherName() {
    return $this->brotherName;
  }
  
  /**
   This function returns the value of the object struct
  */
  function getValue() {
    return $this->value;
  }
    
  /**
   This function returns the type of the object struct
  */
  function getType() {
    return $this->type;
  }
}
/**
 This class handles the objects of the data array of the XMl schema
*/
class ObjectData {
  var $path_structure;
  var $value;
  var $elementID;

  /**
   This function constructs an element of the data array of the XML schema
  */

  function  __construct($path_structure, $value, $elementID) {
    $this->path_structure = $path_structure;
    $this->value = $value;
    $this->elementID=$elementID;
  }

  /**
   This function returns the path of the structure
  */
  function getPathStructure() {
    return $this->path_structure;
  }
  /**
   This function returns the value of the data object.
  */
  function getValue() {
    return $this->value;
  }

  /**
   This function returns the id of an element
  */
  function getElementID() {
    return $this->elementID;
  }
}

?>